package com.cha.chaCommon.core.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@NoArgsConstructor
@AllArgsConstructor
@Data
@TableName("baby_physical_indicators_table")
public class BabyPhysicalIndicators {

    /**
     * 身体指标id，设置为自增主键，无需手动添加
     */
    @TableId(type = IdType.AUTO)
    private Long indicatorId;

    /**
     * 宝宝id
     */
    private Long babyId;

    /**
     * 身高
     */
    private BigDecimal height;

    /**
     * 体重
     */
    private BigDecimal weight;

    /**
     * 头围
     */
    private BigDecimal headAround;

    /**
     * 测量时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate measurementTime;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
